package com.waiting.string;

/**
 * @Description
 * @Author bjweitingting
 * @Date 2018/9/19
 **/
public class StringOverride {
    public static void main(String[] args) {
        User user = new User("waiting", 25);
        System.out.println(user.toString());

    }
}

class User {

    private String name;
    private int age;

    User(String name, int age) {
        this.name = name;
        this.age = age;
    }

//    public String toString() {
//        return "name=" + name + "; age=" + age;
//    }
}
